using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.SupplyChain.Material;


namespace HengTong.ViewModel.SupplyChain.SysMaterialAttributeValueVms
{
    public partial class SysMaterialAttributeValueTemplateVm : BaseTemplateVM
    {
        [Display(Name = "属性")]
        public ExcelPropety AttributeExcel = ExcelPropety.CreateProperty<SysMaterialAttributeValue>(x => x.AttributeId);
        [Display(Name = "属性值")]
        public ExcelPropety ValueExcel = ExcelPropety.CreateProperty<SysMaterialAttributeValue>(x => x.Value);

	    protected override void InitVM()
        {
            AttributeExcel.DataType = ColumnDataType.ComboBox;
            AttributeExcel.ListItems = DC.Set<SysMaterialAttribute>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysMaterialAttributeValueImportVm : BaseImportVM<SysMaterialAttributeValueTemplateVm, SysMaterialAttributeValue>
    {

    }

}
